/* 导入共享样式 */
@import url('../common/reset.css');
@import url('../common/variables.css');
@import url('../components/buttons.css');
@import url('../components/forms.css');
@import url('../components/alerts.css');

/* Google Font导入 */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4ade80; /* 清新绿色 */
    --secondary-color: #38bdf8; /* 淡蓝色 */
    --accent-color: #a7f3d0; /* 薄荷绿 */
    --background-color: #f0fdf4; /* 浅绿背景 */
    --text-color: #334155;
    --light-text: #64748b;
    --error-color: #f87171;
    --border-color: #d1fae5;
    --success-color: #4ade80;
    --white: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Nunito Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* 注册页面容器 */
.register-container {
    display: flex;
    height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #f9fbfa, #e6f7f0);
    overflow: hidden;
    z-index: 1;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: transparent; /* 确保背景是透明的 */
}

/* 注册卡片 */
.register-card {
    display: flex;
    width: 1000px;
    height: 700px;
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 左侧品牌展示区 */
.register-banner {
    flex: 1;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.9), rgba(56, 189, 248, 0.8)),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234ade80" fill-opacity="0.4" d="M0,192L48,208C96,224,192,256,288,250.7C384,245,480,203,576,208C672,213,768,267,864,282.7C960,299,1056,277,1152,229.3C1248,181,1344,107,1392,69.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    text-align: center;
    z-index: 2;
}

.register-banner h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.register-banner p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 80%;
}

/* 图标容器 */
.icon-container {
    margin-top: 2rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 右侧注册表单区 */
.register-form {
    flex: 1.5;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.form-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.form-header p {
    color: var(--light-text);
    font-size: 0.875rem;
}

/* 表单行样式 */
.form-row {
    margin-bottom: 0.15rem;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 0.3rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white);
    color: var(--text-color);
    transition: all 0.2s ease;
    height: 38px;
    font-family: 'Nunito Sans', sans-serif;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
    outline: none;
}

.form-input.is-invalid {
    border-color: var(--error-color);
    background-color: rgba(248, 113, 113, 0.05);
}

.form-input.is-valid {
    border-color: var(--success-color);
    background-color: rgba(74, 222, 128, 0.05);
}

.error-message {
    font-size: 0.75rem;
    color: var(--error-color);
    margin-top: 0.10rem;
    min-height: 10px;
}

/* 必填字段标记 */
.required {
    color: var(--error-color);
    margin-left: 4px;
}

/* 协议同意复选框 */
.form-agreement {
    margin: 0.8rem 0;
    display: flex;
    align-items: flex-start;
}

.form-agreement input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
    accent-color: var(--primary-color);
}

.form-agreement label {
    font-size: 0.9rem;
    color: var(--light-text);
}

.form-agreement a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-agreement a:hover {
    text-decoration: underline;
}

/* 注册按钮容器 */
.register-action {
    margin: 1rem 0;
}

.register-action button {
    width: 100%;
    height: 42px;
    background: linear-gradient(135deg, #4ade80, #38bdf8);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(56, 189, 248, 0.2);
    position: relative;
    overflow: hidden;
}

.register-action button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transition: all 0.6s ease;
}

.register-action button:hover:before {
    left: 100%;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 表单链接 */
.form-links {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--light-text);
}

.form-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.5rem;
}

.form-links a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .register-card {
        width: 90%;
        height: auto;
        min-height: 650px;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .register-card {
        width: 95%;
        min-height: 600px;
    }
    
    .register-banner, 
    .register-form {
        flex: none;
    }
    
    .register-banner {
        padding: 2rem 1rem;
    }
    
    .register-form {
        padding: 2rem 1.5rem;
    }
    
    .form-container {
        max-width: 100%;
    }
} 